From f85d9e8113150d27a27d4efa2af84d9509b1f93b Mon Sep 17 00:00:00 2001 From: Jimi Xenidis Date: Tue, 10 Oct 2006 09:11:32 -0400 Subject: [PATCH] [XEN][POWERPC] New interface ATTN() to conact the HW probe Sometimes it is useful to have your code contact the HW probe directly rather than call BUG(). Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --HG-- extra : transplant_source : %05%C8%CE%1Di%7C%D7%D1j%DB%FBpf%80%AD%FB%95%D4I%0F --- xen/arch/powerpc/setup.c | 12 ++++++++++-- xen/include/asm-powerpc/debugger.h | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/xen/arch/powerpc/setup.c b/xen/arch/powerpc/setup.c index 31f7a7d694..c31fa1cd7e 100644 --- a/xen/arch/powerpc/setup.c +++ b/xen/arch/powerpc/setup.c @@ -111,12 +111,20 @@ static void __init do_initcalls(void) } } -static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs) + +void noinline __attn(void) { /* To continue the probe will step over the ATTN instruction. The * NOP is there to make sure there is something sane to "step * over" to. */ - asm volatile(".long 0x00000200; nop"); + console_start_sync(); + asm volatile("attn"); + console_end_sync(); +} + +static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs) +{ + __attn(); } static void percpu_init_areas(void) diff --git a/xen/include/asm-powerpc/debugger.h b/xen/include/asm-powerpc/debugger.h index 6fea7a3958..9ef2e375ea 100644 --- a/xen/include/asm-powerpc/debugger.h +++ b/xen/include/asm-powerpc/debugger.h @@ -68,6 +68,9 @@ extern void __warn(char *file, int line); #define WARN() __warn(__FILE__, __LINE__) #define WARN_ON(_p) do { if (_p) WARN(); } while ( 0 ) +extern void __attn(void); +#define ATTN() __attn(); + #define FORCE_CRASH() __force_crash() #ifdef CRASH_DEBUG -- 2.30.2